//
//  Deal.m
//  tuangou
//
//  Created by quan jimmy on 11-11-26.
//  Copyright 2011年 tencent. All rights reserved.
//

#import "Deal.h"


@implementation Deal
@synthesize id,sales_num,deal_img,deal_url,deal_desc,deal_title,value,price,rebate;

- (id)initWithDict:(NSDictionary *)dict {
    self = [super init];
    if (self) {
        if (![dict isKindOfClass:[NSString class]]) {
            self.id = [[dict objectForKey:@"id"] intValue];
            self.sales_num = [[dict objectForKey:@"sales_num"] intValue];
            self.deal_img = [dict objectForKey:@"deal_img"];
            self.deal_url = [dict objectForKey:@"deal_url"];
            self.deal_desc = [dict objectForKey:@"deal_desc"];
            self.deal_title = [dict objectForKey:@"dealTitle"];
            self.value = [[dict objectForKey:@"value"] floatValue];
            self.price = [[dict objectForKey:@"price"] floatValue];
            self.rebate = [[dict objectForKey:@"rebate"] floatValue];
        }
    }
    
    return self;
}
@end
